<?php
$host = 'b-it9flqlehwvedg.bch.rds.gz.baidubce.com:3306';
$user = 'b_it9flqlehwvedg';
$pwd  = 'zl1999921';
$bgname = 'b_it9flqlehwvedg';
$con = mysqli_connect($host, $user, $pwd, $bgname);
if (!$con) {
  die('数据库连接失败');
}



//测试
// $host = 'localhost:3306';
// $user = 'root';
// $pwd  = 'root';
// $bgname = 'item';
// $con = mysqli_connect($host, $user, $pwd, $bgname);
// if (!$con) {
//   die('数据库连接失败');
// }